package bth.reconfs;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.Toast;

public class General extends Fragment{
	
	private Button butOrganisation;
	private Button butItinerary;

	public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {             
	    View rootView = inflater.inflate(R.layout.general, container, false);
	    
	    butOrganisation = (Button) rootView.findViewById(R.id.organisation);
	    butOrganisation.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Toast.makeText(getActivity(), "Clicked butOrganisation", Toast.LENGTH_SHORT).show();
			}
		});	
	    
	    butItinerary = (Button) rootView.findViewById(R.id.itinerary);
	    butItinerary.setOnClickListener(new View.OnClickListener() {
			public void onClick(View v) {
				Intent itinerary = new Intent(getActivity(), Itinerary.class);
				startActivityForResult(itinerary, 2);
			}
		});
	    
	    return rootView;
	}
}